﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Runtime.Serialization;

namespace AppServices
{
	[DataContract]
	public class ProductsClass
	{
		/// <summary>
		/// Create a new Products object.
		/// </summary>
		/// <param name="discontinued">Initial value of Discontinued.</param>
		/// <param name="productID">Initial value of ProductID.</param>
		/// <param name="productName">Initial value of ProductName.</param>
		public ProductsClass(Products propducts)
		{
			Discontinued = propducts.Discontinued;
			Logo = propducts.Logo;
			ProductID = propducts.ProductID;
			ProductName = propducts.ProductName;
			QuantityPerUnit = propducts.QuantityPerUnit;
			ReorderLevel = propducts.ReorderLevel;
			UnitPrice = propducts.UnitPrice;
			UnitsInStock = propducts.UnitsInStock;
			UnitsOnOrder = propducts.UnitsOnOrder;
		}

		[DataMember]
		public bool Discontinued
		{
			get;
			set;
		}

		[DataMember]
		public byte[] Logo
		{
			get;
			set;
		}

		[DataMember]
		public int ProductID
		{
			get;
			set;
		}

		[DataMember]
		public string ProductName
		{
			get;
			set;
		}
		
		[DataMember]
		public string QuantityPerUnit
		{
			get;
			set;
		}

		[DataMember]
		public Nullable<short> ReorderLevel
		{
			get;
			set;
		}

		[DataMember]
		public Nullable<decimal> UnitPrice
		{
			get;
			set;
		}

		[DataMember]
		public Nullable<short> UnitsInStock
		{
			get;
			set;
		}

		[DataMember]
		public Nullable<short> UnitsOnOrder
		{
			get;
			set;
		}
	}
}
